var mapModule = angular.module('MapModule', ['CommonModule']);

mapModule.factory('MapService', ['$http', '$log', 'ApiUrls',function($http, $log,ApiUrls) {

    function MapService() {
        
    }

    MapService.prototype.init = function() {

    }; 

    MapService.prototype.initFullPage = function(id_selector) {
        $(id_selector).fullpage();
    }; 

    MapService.prototype.queryMapData = function(fn) {
        $http({
                method: 'GET',
                url: ApiUrls.mapData
            })
            .success(function(data, status, headers, config) {
                fn.call(this, data);
            })
            .error(function(data, status, headers, config, statusText) {
                $log.error('method:queryMapData' + 'status:' + status + 'statusText:' + statusText);
            });
    };

    return new MapService();
}]);
